﻿<Application
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
	xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"
	x:Class="MyUtility.App">

	<!--Application Resources-->
	<Application.Resources>
		<Style x:Key="MyButtonStyle01" TargetType="Button">
			<Setter Property="Background" Value="Transparent"/>
			<Setter Property="BorderBrush" Value="{StaticResource PhoneForegroundBrush}"/>
			<Setter Property="Foreground" Value="{StaticResource PhoneForegroundBrush}"/>
			<Setter Property="BorderThickness" Value="{StaticResource PhoneBorderThickness}"/>
			<Setter Property="FontFamily" Value="{StaticResource PhoneFontFamilySemiBold}"/>
			<Setter Property="FontSize" Value="{StaticResource PhoneFontSizeMediumLarge}"/>
			<Setter Property="Padding" Value="10,3,10,5"/>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="Button">
						<Grid Background="Transparent">
							<VisualStateManager.VisualStateGroups>
								<VisualStateGroup x:Name="CommonStates">
									<VisualStateGroup.Transitions>
										<VisualTransition GeneratedDuration="0">
											<Storyboard AutoReverse="True" RepeatBehavior="Forever">
												<ColorAnimation Duration="0" To="#FF23272E" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[3].(GradientStop.Color)" Storyboard.TargetName="ButtonBackground" d:IsOptimized="True"/>
											</Storyboard>
										</VisualTransition>
										<VisualTransition GeneratedDuration="0:0:0.2" To="Pressed">
											<Storyboard>
												<ColorAnimation Duration="0" To="#FF1C1F25" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[3].(GradientStop.Color)" Storyboard.TargetName="ButtonBackground" d:IsOptimized="True"/>
												<ColorAnimation Duration="0" To="#FF8B95B0" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="ButtonBackground" d:IsOptimized="True"/>
												<ColorAnimation Duration="0" To="#FF767676" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="ButtonBackground" d:IsOptimized="True"/>
											</Storyboard>
										</VisualTransition>
									</VisualStateGroup.Transitions>
									<VisualState x:Name="Normal">
										<Storyboard>
											<ColorAnimation Duration="0" To="#FF2B303B" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[3].(GradientStop.Color)" Storyboard.TargetName="ButtonBackground" d:IsOptimized="True"/>
										</Storyboard>
									</VisualState>
									<VisualState x:Name="MouseOver"/>
									<VisualState x:Name="Pressed">
										<Storyboard>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentContainer">
												<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneBackgroundBrush}"/>
											</ObjectAnimationUsingKeyFrames>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="ButtonBackground">
												<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneForegroundBrush}"/>
											</ObjectAnimationUsingKeyFrames>
										</Storyboard>
									</VisualState>
									<VisualState x:Name="Disabled">
										<Storyboard>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentContainer">
												<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneDisabledBrush}"/>
											</ObjectAnimationUsingKeyFrames>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="ButtonBackground">
												<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneDisabledBrush}"/>
											</ObjectAnimationUsingKeyFrames>
										</Storyboard>
									</VisualState>
								</VisualStateGroup>
								<VisualStateGroup x:Name="FocusStates">
									<VisualState x:Name="Unfocused"/>
									<VisualState x:Name="Focused"/>
								</VisualStateGroup>
							</VisualStateManager.VisualStateGroups>
							<Border x:Name="ButtonBackground" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="20" Margin="{StaticResource PhoneTouchTargetOverhang}">
								<Border.Background>
									<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
										<GradientStop Color="#FFCAD9FF" Offset="0"/>
										<GradientStop Color="White" Offset="1"/>
										<GradientStop Color="#FF969697" Offset="0.245"/>
										<GradientStop Color="#FF586073" Offset="0.479"/>
										<GradientStop Color="#FFA49B9B" Offset="0.753"/>
									</LinearGradientBrush>
								</Border.Background>
								<ContentControl x:Name="ContentContainer" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Foreground="{TemplateBinding Foreground}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Padding="{TemplateBinding Padding}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
							</Border>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<Style x:Key="MyButtonStyle02" TargetType="Button">
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="Button">
						<Grid>
							<VisualStateManager.VisualStateGroups>
								<VisualStateGroup x:Name="CommonStates">
									<VisualStateGroup.Transitions>
										<VisualTransition GeneratedDuration="0:0:0.2" To="Pressed"/>
									</VisualStateGroup.Transitions>
									<VisualState x:Name="Disabled"/>
									<VisualState x:Name="Normal"/>
									<VisualState x:Name="MouseOver"/>
									<VisualState x:Name="Pressed">
										<Storyboard>
											<ColorAnimation Duration="0" To="#FF5FEE2F" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="path" d:IsOptimized="True"/>
										</Storyboard>
									</VisualState>
								</VisualStateGroup>
							</VisualStateManager.VisualStateGroups>
							<Path x:Name="path" Data="M113.90334,389.94052 C113.90334,348.54156 108.19331,308.03656 108.19331,267.17471 C123.87506,277.62921 170.31081,378.84607 183.8513,358.53531 C215.02907,311.76868 252.43576,229.46286 308.04462,207.21933 C308.04462,234.92792 304.3024,259.9971 300.90707,287.15985 C299.59418,297.66306 286.32877,337.13846 295.19702,347.11523 C314.54422,368.88083 380.91449,381.62454 413.6803,387.08551 C398.95401,393.39676 381.56329,401.3606 365.14499,401.3606 C365.14499,466.34961 417.29547,524.40472 427.95538,588.36432 C410.2692,579.52124 317.35172,483.64255 309.47211,494.14871 C297.82321,509.6806 303.76208,560.88031 303.76208,582.6543 C303.76208,609.1499 307.40903,636.58691 300.90707,662.59479 C279.10336,640.79108 271.13327,606.20813 250.94424,582.6543 C237.0271,566.4176 183.41621,595.96753 156.72862,602.6394 C154.21272,603.26837 78.541733,631.30188 111.04832,606.92194 C128.95155,593.49451 151.08754,585.85803 168.1487,571.23419 C137.2128,571.23419 85.424576,561.28448 56.802975,544.11151 C74.332176,532.42542 98.178207,527.46228 119.61338,522.69891 C134.41599,519.40942 131.84943,523.51483 108.19331,499.85873 C83.056984,474.72241 63.22522,453.2247 42.527882,425.62827 C39.725113,421.89124 33.720146,419.91821 48.237919,419.91821 C56.949558,419.91821 65.496948,421.34573 73.933083,421.34573 C85.070129,421.34573 98.546692,425.20749 109.62082,424.20074 C121.84715,423.08926 116.75836,378.9299 116.75836,359.96283" Fill="#FF2C2CFF" Stretch="Fill" Stroke="Black" UseLayoutRounding="False"/>
							<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
	</Application.Resources>

	<Application.ApplicationLifetimeObjects>
		<!--Required object that handles lifetime events for the application-->
		<shell:PhoneApplicationService 
			Launching="Application_Launching" Closing="Application_Closing" 
			Activated="Application_Activated" Deactivated="Application_Deactivated"/>
	</Application.ApplicationLifetimeObjects>
</Application>